﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="{$cfg_site_description}" />

<title>{$cfg_site_name}回答|{$cfg_site_name}</title>
{template 'header'}
<body>
<div id="sysmsg-error-box" style="top:157px;display: none;">
		<div class="sysmsgw hidd" id="sysmsg-error" style="display: block;">
			<div class="sysmsg"><span>{$ERROR_MSG}</span><span class="close">關閉</span></div>
		</div>
		<div class="sysmsgw hidd" id="sysmsg-success" style="display: none;">
			<div class="sysmsg"><span></span><span class="close">關閉</span></div>
		</div>
</div>
<div id="buy917_wrap">   
    <div id="buy917_header">
    	<div id="buy917_logo"><a href="index.php">Buy917</a></div>
        <div class="buy917_header_banner">
        	<div class="buy917_header_topbanner">
           		{template 'login_line'} <!-- login_line.html 登入/註冊按鈕 --> 
				<?php include("admin/event.php")?>
            </div>
          	<div class="buy917_header_select">
            	<div class="buy917_header_city">
                	 {if !empty($_cityid)}
                    <div class="guides">
                        <div class="city">
                            <h2>{$_cityname}</h2>
                        </div>
                        <div id="guides-city-change" class="change">切換城市</div>
                        <div id="guides-city-list" class="city-list">
                            <ul>
                            {loop $_citylist $v}
                                <li {if $v['cid']==$_cityid}class="current"{/if}><a href="index.php?cityid={$v['cid']}">{$v['cityname']}</a></li>
                            {/loop}
                            </ul>                   
                        </div>
                    </div>
                    {/if}	
                </div>
                <div class="buy917_header_group">
                	{template 'headergroup'}	
                </div>
            </div>
       </div>
    </div><!-- buy917_header -->
  
    <div id="buy917_menu">
    	<a href="index.php">馬上 揪一起</a>
        <a href="grouplist.php">曾經 揪一起</a>
        <a href="article.php?aid=3" <?php if($_GET['aid']== 3){ echo "class='on'";} ?>>怎樣 揪一起</a>
        <a href="article.php?aid=1" class="end <?php if($_GET['aid']== 1){ echo "on";} ?>">問答 揪一起</a>       
    </div><!-- buy917_menu -->
       
    <div id="buy917_middle">
        	<div class="buy917_grouplist_top"></div>      
            <div class="buy917_grouplist_body"> 
                <h2>今日商品有問必答</h2>
				{if !empty($gid)}
				<div class="deal-info">
				  <table width="90%" align="center" class="deal-info-table">
					<tr>
					  	<td width="87%" class="link"><p><a href="view.php?gid={$value['gid']}" class="backa">&raquo; 返回本團購</a></p>					  	
							<h3><a href="buy.php?gid={$value['gid']}">{$value['title']}</a></h3>
								
							<table width="100%">
								<tr>
									<td width="50%" style="text-align:center;">
										<a href="buy.php?gid={$value['gid']}"><img src='{$value[imgarray][$value[goods_pic]][filepath]}' border="0" width="300"></a>
									</td>
									<td style="border:solid 1px #7accf6; background:#cfeef6;text-align:center; color:#111;font-size:14px;">原價：${$value['market_price']}</td>
									<td style="background:#e6086d; text-align:center; color:#000;font-size:32px;">特價：${$value['shop_price']}</td>
									<td style="border:solid 1px #7accf6; background:#cfeef6;text-align:center; color:#111;font-size:14px;">節省：${echo $value['market_price']-$value['shop_price'];}
								</tr>
							</table>
						</td>
					    <td width="13%" align="center" class="buy">
					    	<a href="buy.php?gid={$value['gid']}"><img src="{TPL}images/buybtn.gif" border="0"/></a>
						</td>
					</tr>
				  </table>
			  </div>
                {/if}
				
		<div id="content">
          <div class="box clear">
            <div class="box-top"></div>
            <div class="box-content">
              <div class="head">
                <h2>{$cfg_site_name}回答</h2>
              </div>
              <div class="sect consult-list">
                <ul class="list">                
                {loop $dataarray $n $r}
                  <li id="consult-entry-{$r['gid']}" {if ($n-1)%2==0} class="alt"{else}{/if}>
                    <div class="item">
                      <p class="user"><strong>{$r['uname']}</strong>{ddate('Y-m-d',$r[addtime])}</p>
                      <div class="clear"></div>
                      <p class="text">{$r['msg']}</p>
                      {if !empty($r['reply'])}
                      <p class="reply"><strong>回覆：</strong>{$r['reply']}</p>
                      {/if}
                    </div>
                  </li>
                 {/loop}
                  
                </ul>
                <ul class="paginator">
                  {echo pagelist($total,$pagesize,$page,"guestbook.php?gid=$gid");}
                </ul>
              </div>
              <div class="head" id="consult-form-head">
                <h2>我要提問</h2>
              </div>
              <div class="sect consult-form">
                <form id="consult-add-form" method="post" action="guestbook.php?gid={$gid}">
                  <textarea class="f-textarea" cols="60" rows="5" name="question"></textarea>
                  <p class="commit">
                    <input type="hidden" id="gid" name="gid" value="{$gid}" />
                    <input type="submit" value="好了，提交" name="commit" class="formbutton"/>
                  </p>
                </form>
                <div id="consult-add-succ" class="succ">
                  <p>您的問題已成功提交，客服人員很快就會回覆囉，稍等一會兒再來看吧。</p>
                  <p><a href="view.php?gid={$gid}">返回本團購</a>，或<a id="consult-add-more" href="javascript:void(0);">還有其他問題？</a></p>
                </div>
              </div>
            </div>
            <div class="box-bottom"></div>
          </div>
        </div>
        		
            </div><!-- buy917_grouplist_body -->
            <div class="buy917_grouplist_bottom"></div>
    </div><!-- buy917_middle -->
</div><!-- buy917wrap -->
<!-- footer -->
<div id="buy917_footer">
	{template 'footer'}	
</div>
</body>
</html>
